Skip to content

Conversation

@oliverbaehler
Copy link
Collaborator

@oliverbaehler oliverbaehler commented Oct 20, 2024

This PR proposes a new CRD for the capsule-proxy GlobalProxySettings. Its meant for use-cases, where we want to bind clusterScoped Listing permissions to subjects (eg. listing clusters). An example:

apiVersion: capsule.clastix.io/v1beta1
kind: GlobalProxySettings
metadata:
  name: global-proxy-settings
spec:
  rules:
  - subjects:
    - kind: User
      name: alice
    clusterResources:
    - apiGroups:
      - "*"
      resources:
      - "*"
      operations:
      - List
      selector:
        matchLabels:
          app.kubernetes.io/type: dev
  - subjects:
     - kind: User
       name: alice
    clusterResources:
     - apiGroups:
       - "*"
       resources:
       - "*"
       operations:
       - List
       selector:
         matchLabels:
           app.kubernetes.io/type: meowie

It converts all modules to GKs to GVKs. This is a preparation to make clusterResources properties compatible with tenant selected attributes (for cluster-scoped resources)

It also adds a first e2e usinbg ginkgo, im going to add more tests in seperate PRs. Creates the fundament for #257

@oliverbaehler oliverbaehler force-pushed the feat/global-crd branch 2 times, most recently from 94325c5 to da2469d Compare October 20, 2024 08:21
@oliverbaehler oliverbaehler changed the title WIP: feat: add globalproxysettings feat: add globalproxysettings Oct 20, 2024
Copy link
Member

@prometherion prometherion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, please, let's fix the linter, happy to have at least some e2e back in place 🫠

@prometherion
Copy link
Member

Sorry Oliver, again conflicts 🫠 that's my fault!

@oliverbaehler oliverbaehler force-pushed the feat/global-crd branch 2 times, most recently from 82f10c1 to 6eded86 Compare January 10, 2025 01:50
Signed-off-by: Oliver Bähler <[email protected]>
@oliverbaehler oliverbaehler merged commit f2c393e into projectcapsule:main Jan 10, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants